package day1107.demo01;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/7 9:37
 */

public class Test02 {
    public static void main(String[] args) {
        //字符串解析为时间
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse("2022-10-01 12:12:12",dateTimeFormatter);
        System.out.println("parse = " + parse);
    }
}
